// 50 =

#include <algorithm>
#include <cstdio>
#include <tuple>
#include <vector>
constexpr int MaxN = 2e5 + 5;
int n, base;
int a[MaxN];
int h[MaxN];
int wCnt[MaxN];
int preSum[MaxN];
long long dp[MaxN];
std::vector<std::tuple<int, int>> v;
std::vector<std::tuple<int, int>> r;
long long killCost(long long x, long long kill)
{
    return x == 0 ? x : (x + kill - 1) / kill - 1;
}
int main()
{
    freopen("xinyue.in", "r", stdin);
    freopen("xinyue.out", "w", stdout);
    scanf("%d%d", &n, &base);
    for (int i = 1; i <= n; i++)
    {
        int x, y;
        scanf("%d%d", &x, &y);
        r.push_back({x, y});
    }
    std::sort(r.begin(), r.end(), [](const std::tuple<int, int> &x, const std::tuple<int, int> &y) {
        return std::get<1>(x) > std::get<1>(y);
    });
    for (const auto &val : r)
    {
        if (std::get<1>(val) <= base)
        {
            base = std::max(std::get<0>(val), base);
            continue;
        }
        v.push_back(val);
    }
    std::sort(v.begin(), v.end());
    v.insert(v.begin(), {base, 0});
    n = v.size();
    for (int i = 1; i <= n; i++)
    {
        a[i] = std::get<0>(v[i - 1]);
        h[i] = std::get<1>(v[i - 1]);
    }
    for (int i = 1; i <= n; i++)
    {
        dp[i] = 0x7f7f'7f7f'7f7f;
    }
    dp[n] = 0;
    for (int i = n; i >= 1; i--)
    {
        long long sumCost = 0;
        for (int j = i - 1; j >= 1; j--)
        {
            dp[j] = std::min(dp[j], dp[i] + killCost(h[i], std::max(base, a[j])) * a[i] + sumCost);
            sumCost += killCost(h[j], std::max(base, a[n])) * a[j];
        }
    }
    printf("%lld\n", dp[1]);
    return 0;
}
